import { createApp } from 'vue';
import { createI18n } from 'vue-i18n';
import messages from '@intlify/vite-plugin-vue-i18n/messages';
import VueFullPage from '@/lib/vue-fullpage.js';
import 'vue-fullpage.js/dist/style.css';

import { getLanguage } from '@/utils/index.js';
import 'animate.css/animate.compat.css';

import App from './App.vue';
import 'normalize.css/normalize.css';
/* 导入svg使用 */
import 'virtual:svg-icons-register';
import svgIcon from '@/icons/svg-icon.vue';

/* 导入工程css */
import '@/styles/index.scss';
import 'tailwindcss/tailwind.css';

const i18n = createI18n({
  locale: getLanguage(messages),
  messages,
});

export const app = createApp(App);

app.config.globalProperties.$version = app.version;

app.component('svg-icon', svgIcon);

app.use(i18n).use(VueFullPage);

app.mount('#app');

document.title = import.meta.env.VITE_PROJ_NAME;
